﻿using System;
using System.Collections.Generic;




[Serializable]
public class Response_General<T>
{
    public int code;
    public string msg;
    public T body;
}


#region UserData

[Serializable]
public class Body_UserData
{
    public string user_name;
    public string nick_name;
    public string virtual_image;
    public string cover_image;
    public string signature;
    public string gender;
    public string school_name;
    public string is_verified;
    public string platform;
    public string status;
    public string update_time;
    public string create_time;
    public Data_UserDataExt ext;
}

[Serializable]
public class Data_UserDataExt
{
    public string user_name;
    public string tag;
    public string avatar;
    public string birthday;
    public string country;
    public string province;
    public string city;
    public string district;
    public string address;
    public string imei;
    public int version_id;
    public int channel_id;
    public string school_name;
}
#endregion

#region ResData

[Serializable]
public class Body_ResourceData
{
    public List<Data_Category> category_2;
    public List<Data_Category> category_3;
    public List<Data_ResourceInfo> resource;
}

[Serializable]
public class Data_Category
{
    public int id;
    public string category_name;
    public int tag_group_id;
    public int tag_group_id2;
    public string icon;
    public string select_icon;
    public string is_default;
    public int tag_id;
    public string status;
    public string create_time;
    public string display_name;

    public Data_Category()
    {
    }

    public Data_Category(int id, string category_name, int tag_group_id, int tag_group_id2, string icon, string iconSelect, string is_default, int parent_id, string status, string create_time, string display_name)
    {
        this.id = id;
        this.category_name = category_name;
        this.tag_group_id = tag_group_id;
        this.tag_group_id2 = tag_group_id2;
        this.icon = icon;
        this.select_icon = iconSelect;
        this.is_default = is_default;
        this.tag_id = parent_id;
        this.status = status;
        this.create_time = create_time;
        this.display_name = display_name;
    }
}

[Serializable]
public class Data_ResourceInfo
{
    public int id;
    public string user_name;
    public string display_name;
    public string ios_url;
    public string android_url;
    public string icon_image;
    public int category_id;
    public string status;
    public int version_id;
    public string update_time;
    public string create_time;
}

/// <summary>
/// Client从服务器获取资源ID
/// </summary>
//[Serializable]
//public class Data_GetResourceId
//{
//    public int id;
//    public string user_name;
//    public string display_name;
//    public string image_url;
//    public string icon_image;
//    public int category_id;
//    public string is_public;
//    public string update_time;
//    public string create_time;
//
//    public Data_GetResourceId(int id, string user_name, string display_name, string image_url, string icon_image, int category_id, string is_public, string update_time, string create_time)
//    {
//        this.id = id;
//        this.user_name = user_name;
//        this.display_name = display_name;
//        this.image_url = image_url;
//        this.icon_image = icon_image;
//        this.category_id = category_id;
//        this.is_public = is_public;
//        this.update_time = update_time;
//        this.create_time = create_time;
//    }
//}

[Serializable]
public class OSSResModel
{
    public string AccessKeySecret;
    public string AccessKeyId;
    public string Expiration;
    public string SecurityToken;
    public string bucket;
    public string regionid;
    public string endpoint;
    //    public string publicBucket;
    public string use_public_bucket;

    public OSSResModel(string keyId, string keySecret, string expiration, string token, string bucket, string publicBucket, string endPoint, string regionId)
    {
        this.AccessKeyId = keyId;
        this.AccessKeySecret = keySecret;

        this.Expiration = expiration;
        this.SecurityToken = token;
        this.bucket = bucket;
        this.use_public_bucket = publicBucket;
        this.endpoint = endPoint;
        this.regionid = regionId;
    }
}

/// <summary>
/// Aliyun VOD 数据模型
/// </summary>
[Serializable]
public class AliyunVODModel
{
    public string UploadAddress;
    public string VideoId;
    public string RequestId;
    public string UploadAuth;

    public AliyunVODModel(string uploadAddress, string videoId, string requestId, string uploadAuth)
    {
        UploadAddress = uploadAddress;
        VideoId = videoId;
        RequestId = requestId;
        UploadAuth = uploadAuth;
    }
}




//保存页面, Tags-----------------------
[Serializable]
public class SavePageTagModel
{
    public List<SingleTagModel> list;
    public Page page;

    public SavePageTagModel(List<SingleTagModel> tagList, Page page)
    {
        this.list = tagList;
        this.page = page;
    }
}

//保存页面, Category-----------------------
[Serializable]
public class SavePageCategoryModel
{
    public List<SingleCategoryModel> list;
    public Page page;

    public SavePageCategoryModel(List<SingleCategoryModel> categoryList, Page page)
    {
        this.list = categoryList;
        this.page = page;
    }
}

[Serializable]
public class SingleCategoryModel
{
    public int id;
    public string category_name;
    public int tag_group_id;
    public int tag_group_id2;
    public string is_default;
    public int parent_id;

    public List<SingleCategorySubModel> category_2;

    public SingleCategoryModel(int id, string category_name, int tag_group_id, int tag_group_id2, string is_default, int parent_id, List<SingleCategorySubModel> category_2)
    {
        this.id = id;
        this.category_name = category_name;
        this.tag_group_id = tag_group_id;
        this.tag_group_id2 = tag_group_id2;
        this.is_default = is_default;
        this.parent_id = parent_id;
        this.category_2 = category_2;
    }
}

[Serializable]
public class SingleCategorySubModel
{
    public int id;
    public string category_name;

    public SingleCategorySubModel(int id, string category_name)
    {
        this.id = id;
        this.category_name = category_name;
    }
}


[Serializable]
public class CategoryItemModel {
    public string title;
    public List<string> subTitles;

    public CategoryItemModel(string title, List<string> subTitles) {
        this.title = title;
        this.subTitles = subTitles;
    }
}



[Serializable]
public class SingleTagModel
{
    public string id;
    public string tags;
    public string group_id;
    public string is_default;
    public string icon;
    public string status;
    public string create_time;
    

    public SingleTagModel(string id, string tags, string group_id, string def, string icon, string status, string create_time)
    {
        this.id = id;
        this.tags = tags;
        this.is_default = def;
        this.icon = icon;
        this.status = status;
        this.create_time = create_time;
    }
}


//内容分页
[Serializable]
public class Page
{
    public int curr_page;
    public int count;
    public int page_size;

}

#endregion